/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package AWT;


import java.awt.Button;
import java.awt.Frame;
import java.awt.GridLayout;
import java.awt.Panel;


public class UsoGrid {

    public static void main(String args []){

          Frame f = new Frame();

           Button b1 = new Button("Centro");
           Button b2 = new Button("Centro");
           Button b3 = new Button("Centro");
           Button b4 = new Button("Centro");
           Button b5 = new Button("Centro");
           Button b6 = new Button("Centro");
           Button b7 = new Button("Centro");
           Button b8 = new Button("Centro");
           Button b9 = new Button("Centro");

           Panel p = new Panel();

           f.setLayout(new GridLayout(3, 3));  // GridLayout te genera tablas en renglones y columnas
          
           p.add(b5, "chiquili me la pela");
           f.add(b1);
           f.add(b2);
           f.add(b3);
           f.add(b4);
           f.add(p);
           f.add(b6);
           f.add(b7);
           f.add(b8);
           f.add(b9);

           f.setVisible(true);
           f.setSize(300, 300);
           f.setLocation(500, 200);

    }
}
